package com.usian.service.impl;

import com.usian.mapper.EtcMapper;
import com.usian.pojo.Ygong;
import com.usian.pojo.User;
import com.usian.service.EtcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EtcServiceImpl implements EtcService {

    @Autowired
    private EtcMapper etcMapper;

    @Override
    public List<Ygong> findAll(Ygong etc) {
        return etcMapper.findAll(etc);
    }

    @Override
    public Ygong findById(Integer id) {
        return etcMapper.findById(id);
    }

    @Override
    public void insertYgong(Ygong etc) {
        etcMapper.insertEtc(etc);
    }

    @Override
    public void update(Ygong etc) {
        etcMapper.update(etc);
    }

    @Override
    public void deleteById(Integer id) {
        etcMapper.deleteById(id);
    }

    @Override
    public void adduser(User user) {
        etcMapper.adduser(user);
    }

    @Override
    public User denglu(User user) {
        User user1=etcMapper.denglu(user);
        return user1;
    }
}
